#ifndef TREEWIDGETITERATOR_H
#define TREEWIDGETITERATOR_H

#include <QObject>
#include <QScriptValue>

class QTreeWidgetItemIterator;
class QTreeWidget;
class QTreeWidgetItem;
class QScriptContext;

QScriptValue treeWidgetIterator(QScriptContext *context, QScriptEngine *engine);

class TreeWidgetIterator : public QObject
{
    Q_OBJECT
public:
    explicit TreeWidgetIterator(QTreeWidget *tree);
public slots:
    void next();
    void previous();
    QTreeWidgetItem *data();

private:

    QTreeWidgetItemIterator* m_iterator;

};

#endif // TREEWIDGETITERATOR_H
